

@RestController
@RequestMapping("/rmsAlertRuleConfig")
public class RmsAlertRuleConfigController {

    @Resource
    private RmsAlertRuleConfigService rmsAlertRuleConfigService;


    /**
     * 获取 RmsAlertRuleConfig 分页列表
     */
    @GetMapping("/pagination")
    public Ret getRmsAlertRuleConfigPagination( PaginationVo paginationVo, RmsAlertRuleConfigQuery rmsAlertRuleConfigQuery ) throws Exception {
        IPage page = rmsAlertRuleConfigService.getRmsAlertRuleConfigPagination(paginationVo, rmsAlertRuleConfigQuery );
        return Ret.toPage(page);
    }


    /**
     * 获取 RmsAlertRuleConfig 所有数据
     */
    @GetMapping("/all")
    public Ret getRmsAlertRuleConfigAllList( RmsAlertRuleConfigQuery rmsAlertRuleConfigQuery ) throws Exception {
        List<RmsAlertRuleConfigEntity> list = rmsAlertRuleConfigService.getRmsAlertRuleConfigAllList( rmsAlertRuleConfigQuery );
        return Ret.ok(list);
    }



    /**
     * 获取 RmsAlertRuleConfig 详情
    */
   @GetMapping("/{id}")
   public Ret getRmsAlertRuleConfigDetail(@PathVariable Long id) throws Exception {

       RmsAlertRuleConfigEntity rmsAlertRuleConfig = rmsAlertRuleConfigService.getRmsAlertRuleConfigDetail(id);
       return Ret.ok(rmsAlertRuleConfig);
   }


    /**
     * 新增 RmsAlertRuleConfig
     * */
    @PostMapping("")
    public Ret addRmsAlertRuleConfig(@RequestBody RmsAlertRuleConfigVo rmsAlertRuleConfigVo) throws Exception {

        rmsAlertRuleConfigService.addRmsAlertRuleConfig(rmsAlertRuleConfigVo);
        return Ret.ok();
    }


    /**
     * 更新 RmsAlertRuleConfig
     * */
    @PutMapping("")
    public Ret updateRmsAlertRuleConfig(@RequestBody RmsAlertRuleConfigVo rmsAlertRuleConfigVo) throws Exception {

        rmsAlertRuleConfigService.updateRmsAlertRuleConfig(rmsAlertRuleConfigVo);
        return Ret.ok();
    }


    /**
     * 删除 RmsAlertRuleConfig
     * */
    @PostMapping("/batchRemove")
    public Ret batchRemoveRmsAlertRuleConfig( @RequestBody List<Long> ids ) throws Exception {

        rmsAlertRuleConfigService.batchRemoveRmsAlertRuleConfig(ids);
        return Ret.ok();
    }
}

  